package org.example.jd.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Classname ContentService
 * @Description TODO
 * @Date 2020/5/20 16:34
 * @Created by 苟晓健
 */
public interface ContentService {

    /**
     * 解析数据放入es索引中
     *
     * @param keywords
     * @return
     * @throws Exception
     */
    public Boolean parseContent(String keywords) throws Exception;


    /**
     * 获取数据实现搜索 功能
     *
     * @param keyword
     * @param pageNo
     * @param pageSize
     * @return
     */
    public List<Map<String, Object>> searchPage(String keyword, int pageNo, int pageSize) throws IOException;



    /**
     * 获取数据实现搜索高亮功能
     *
     * @param keyword
     * @param pageNo
     * @param pageSize
     * @return
     */
    public List<Map<String, Object>> searchHightPage(String keyword, int pageNo, int pageSize) throws IOException;


}
